package com.ruoyi.business.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.business.domain.ResearchPlan;
import com.ruoyi.business.model.PickerModel;
import com.ruoyi.business.model.TreeModel;
import com.ruoyi.business.request.ApiTaskReq;
import com.ruoyi.business.response.ApiPlanLayerRes;
import com.ruoyi.business.response.ApiResearchPlanRes;
import com.ruoyi.business.response.ApiTaskRes;
import com.ruoyi.common.core.domain.PageResult;

/**
 * 调研计划Service接口
 * s
 * @author Eric
 * @date 2024-03-20
 */
public interface IResearchPlanService extends IService<ResearchPlan> {

    List<Map<String, Object>> select();

    PageResult<ApiResearchPlanRes> pageResearchPlan(ApiTaskReq req);

    /**
     * 根据用户id获取用户调研计划
     * @param userId
     * @return
     */
    List<Map<String, Object>> selectByUserId(Long userId);

    /**
     * 获取用户有效期内计划-分配任务
     * @param userId
     * @return
     */
    List<Map<String, Object>> selectValidityPeriodByUserId(Long userId);

    /**
     * 获取用户有效期内计划-未分配任务
     * @param userId
     * @return
     */
    List<Map<String, Object>> selectValidityPeriodNotTaskByUserId(Long userId);

    boolean updatePlan(ResearchPlan researchPlan);

    boolean savePlan(ResearchPlan researchPlan);

    ResearchPlan getResearchPlanInfo(Long id);

    List<ApiPlanLayerRes> getPlanLayer(Long researchPlanId);

    List<PickerModel> getPlanPickerLayer(Long researchPlanId);

    /**
     * 获取已结束的计划
     * @return
     */
    List<ResearchPlan> selectEndPlan();

    List<Map<String, Object>> selectNotTaskPlanByUserId(Long userId);
}
